Context: Supernova 1987A (SN1987A) exploded in the Large Magellanic Cloud (LMC). Its proximity and rapid evolution makes it a unique case study of the early phases in the development of a supernova remnant. One particular aspect of interest is the possible formation of dust in SN1987A, as SNe could contribute significantly to the dust seen at high redshifts. Aims: We explore the properties of SN1987A and its circumburst medium as seen at mm and sub-mm wavelengths, bridging the gap between extant radio and infrared (IR) observations of respectively the synchrotron and dust emission. Methods: SN1987A was observed with the Australia Telescope Compact Array (ATCA) at 3.2 mm in July 2005, and with the Atacama Pathfinder EXperiment (APEX) at 0.87 mm in May 2007. We present the images and brightness measurements of SN1987A at these wavelengths for the first time. Results: SN1987A is detected as an unresolved point source of 11.2 +/- 2.0 mJy at 3.2 mm (5" beam) and 21 +/- 4 mJy at 0.87 mm (18" beam). These flux densities are in perfect agreement with extrapolations of the powerlaw radio spectrum and modified-blackbody dust emission, respectively. This places limits on the presence of free-free emission, which is similar to the expected free-free emission from the ionized ejecta from SN1987A. Adjacent, fainter emission is observed at 0.87 mm extending ~0.5' towards the south-west. This could be the impact of the supernova progenitor's wind when it was still a red supergiant upon a dense medium. Conclusions: We have established a continuous spectral energy distribution for the emission from SN1987A and its immediate surroundings, linking the IR and radio data. This places limits on the contribution from ionized plasma. Our sub-mm image reveals complexity in the distribution of cold dust surrounding SN1987A, but leaves room for freshly synthesized dust in the SN ejecta.